<template>
  <div class="content_card">
    <UHeader>
      <div slot="left">
        <el-input
          size="small"
          style="width: 200px"
          placeholder="请输入内容">
          <i slot="prefix" class="el-input__icon el-icon-search"/>
        </el-input>
        <StatusTab :datas="statusData" />
      </div>
    </UHeader>
    <UTable ref="mTable" :search-api="search" :config="config" :columns="columns" @onHandleClick="onHandleClick" />

  </div>

</template>
<script>
import UHeader from '@/components/UHeader'
import UTable from '@/components/UTable'
import { baseTableConfig } from '@/utils/baseConfig'
import { search, doExamineCar } from '@/api/car'
import columns from './columns'
export default {
  components: {
    UTable, UHeader
  },
  data() {
    return {
      search: search,
      config: baseTableConfig,
      columns: columns
    }
  },
  methods: {
    onHandleClick(b, row, rowInxex) {
      if (b === 1 || b === 2) {
        doExamineCar(row.id, b).then(res => {
          this.$message({
            message: '操作成功',
            type: 'success'
          })
          this.$refs.mTable.refresh()
        })
      }
    }
  }
}
</script>

<style scoped>

</style>
